﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ShopBonusReceiveInfoConfig : EntityTypeConfiguration<ShopBonusReceiveInfo>
    {
        public ShopBonusReceiveInfoConfig()
        {
            ToTable("Himall_ShopBonusReceive");
            Property(item => item.OpenId).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.WXHead).HasColumnType("varchar").HasMaxLength(500);
            Property(item => item.WXName).HasColumnType("varchar").HasMaxLength(50);
            HasRequired(x => x.Himall_Members).WithMany(x => x.Himall_ShopBonusReceive).HasForeignKey(x => x.UserId);
            HasRequired(x => x.Himall_ShopBonusGrant).WithMany(x => x.Himall_ShopBonusReceive).HasForeignKey(x => x.BonusGrantId);
        }
    }
}
